feat: BitHeaps using Vector#22
Merged
Merged
Conversation
bollu
requested changes
Jun 22, 2026
bollu
left a comment
Contributor
There was a problem hiding this comment.
The core change LGTM. I think we can drop width and refactor everything to use the w directly, right? I'd make that change before comitting.
Comment on lines
-68
to
+63
| def highestColumn (h : BitHeap) : Option Nat := | ||
| def highestColumn (h : BitHeap w) : Option Nat := | ||
| let target := h.maxHeight | ||
| h.columns.toList.findSome? (fun (idx, col) => if col.height == target then some idx else none) | ||
| if target == 0 then none else | ||
| h.columns.toList.zipIdx.findSome? | ||
| (fun (col, idx) => if col.height == target then some idx else none) |
Contributor
There was a problem hiding this comment.
Drop this, since it is dead code now.
Collaborator
Author
There was a problem hiding this comment.
we might use this function in the future, so I'd keep it.
Contributor
|
Also, we probably want CI to pass :) |
Collaborator
Author
|
thanks for the feedback, we now use |
Collaborator
Author
|
I'm merging this PR. We will work on addBit/removeBit theorems in the upcoming PRs. |
bollu
added a commit
to opencompl/lean-mlir
that referenced
this pull request
Jun 26, 2026
This should fix the downstream failure in opencompl/datapath-verification#22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.